﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace AMS.UI.Menu
{
    /// <summary>
    /// 菜单创建器
    /// </summary>
    public interface IMainMenu
    {
        /// <summary>
        /// 要创建菜单的窗体
        /// </summary>
        Form MainForm { get; set; }
        /// <summary>
        /// 菜单控件
        /// </summary>
        object MenuControl { get; set; }
        /// <summary>
        /// 菜单文件
        /// </summary>
        string MenuFileName { get; set; }

        /// <summary>
        /// 通知对象
        /// </summary>
        IMenuClickAction MenuClickAction { get; set; }
        /// <summary>
        /// 是否对所有的菜单都授权，如果这个，就不依赖于传进去的授权列表了
        /// </summary>
        bool AuthorizeToAll { get; set; }

        /// <summary>
        /// 创建菜单
        /// </summary>
        /// <param name="removeExistingItems">是否移出已有的项目</param>
        /// <param name="authorizedItems">授权码</param>
        void CreateMenu(bool removeExistingItems, string[] authorizedItems);
    }
}
